<template>
	<!--<div style="width: inherit;">-->
	<el-button
		:disabled="disabled || !hasPermission"
		:loading="loading"
		:icon="icon"
		:size="size"
		:type="type"
		:plain="plain"
		class="flex-center"
		style="margin-right: 0;margin-left: 0;"
		:style="{'text-decoration': hasPermission ? 'none' : 'line-through'}"
		@click="onClick"
	>
		<slot></slot>
	</el-button>
	<!--</div>-->
</template>
<script>
    export default {
        name: 'JkButton',
        props: {
            loading: {
                type: Boolean,
                default: false
            },
            hasPermission: {
                type: Boolean,
                default: true
            },
            plain: {
                type: Boolean,
                default: false
            },
            disabled: {
                type: Boolean,
                default: false
            },
            icon: {
                type: String,
                default: 'small'
            },
            size: {
                type: String,
                default: 'small'
            },
            type: {
                type: String,
                default: 'default'
            }
        },
        data() {
            return {
                isActive: false
            };
        },
        methods: {
            onClick() {
                this.$emit('click');
            }
        }
    };
</script>
<style scoped lang="scss">
</style>
